Renaming

Handling Missing Data (NA, NaN, NULL)

Sorting and Reordering

arrange()

Subsetting and Filtering Data

filter()

Summarizing Data

Adding new columns

Using dplyr’s mutate():

Reshaping Data (Wide/Long)

Wide Data

Long Data

There are two sets of methods that are explained below:

  • gather() and spread() from the tidyr package. This is a newer interface to the reshape2 package.
  • melt() and dcast() from the reshape2 package.

Working with Dates